package cn.mesmile.workflow.behavior;

import org.flowable.bpmn.model.Activity;
import org.flowable.bpmn.model.UserTask;
import org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior;
import org.flowable.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior;
import org.flowable.engine.impl.bpmn.behavior.UserTaskActivityBehavior;
import org.flowable.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory;

/**
 * @author zb
 * @Description
 */
public class WorkFlowActivityBehaviorFactory extends DefaultActivityBehaviorFactory {


    @Override
    public UserTaskActivityBehavior createUserTaskActivityBehavior(UserTask userTask) {
        // 自定义所有节点相关拦截
        return new WorkFlowUserTaskActivityBehavior(userTask);
    }

    @Override
    public ParallelMultiInstanceBehavior createParallelMultiInstanceBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior) {
        // TODO  自定义多实例拦截  逻辑同上
        return super.createParallelMultiInstanceBehavior(activity, innerActivityBehavior);
    }


}
